package com.itheima.wemedia.feign;


import com.itheima.common.vo.ResultVo;
import com.itheima.core.feign.CoreFeign;
import com.itheima.wemedia.pojo.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @version 1.0
 * @description 说明
 * @package com.itheima.media.feign
 */
@FeignClient(name = "leadnews-wemedia", path = "/wmUser")
public interface WmUserFeign extends CoreFeign<WmUser> {

    /**
     * 根据apUserId获取
     * @param apUserId
     * @return
     */
    @GetMapping("/one/{apUserId}")
    ResultVo<WmUser> getByApUserId(@PathVariable(name="apUserId") Integer apUserId);

     /*    *
     * 添加自媒体账号
     * @param wmUser
     * @return*/

    @PostMapping("/save")
    ResultVo<WmUser> insert(@RequestBody WmUser wmUser);

}
